package com.shuoyue.ycgk.ui.questionbank;

import java.text.DecimalFormat;

import lombok.Data;

/**
 * 统计信息
 */
@Data
public class CountInfoBean {
    int totalQuestion;
    int rightQuestion;
    float rightRate;
    float timeMul;
    boolean isAllRight;
    String typeStr;
    float myScore;
    float totalScore;


    public float getMyScore() {

        //保留2
        DecimalFormat decimalFormat = new DecimalFormat(".00");//
        String p = decimalFormat.format(myScore);//format 返回的是字符串
        return Float.valueOf(p);
    }

    public float getTotalScore() {
        //保留
        DecimalFormat decimalFormat = new DecimalFormat(".00");//构造方法的字符格式这里如果小数不足2位,会以0补足.
        String p = decimalFormat.format(totalScore);//format 返回的是字符串
        return Float.valueOf(p);
    }
}